package com.example.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum EventType {
    EnterRoom(1, "进入房间"),
    ImConnected(2, "连接长链接"),
    PrivateMsg(3, "私信");

    private final Integer evenType;
    private final String desc;

    public static EventType of(Integer eventType) {
        for (EventType type : values()) {
            if (Objects.equals(type.evenType, eventType)) {
                return type;
            }
        }
        return null;
    }
}
